<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>主机列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<!-- 新 Bootstrap 核心 CSS 文件 
jQuery文件。务必在bootstrap.min.js 之前引入
 最新的 Bootstrap 核心 JavaScript 文件 -->
<link rel="stylesheet" href="./js/bootstrap_3.3.5/css/bootstrap.css">
<script src="./js/jquery_1.11/jquery-1.11.3.min.js"></script>
<script src="./js/bootstrap_3.3.5/js/bootstrap.js"></script>
<!-- ztree  -->
<link href="./js/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet">
<script src="./js/ztree/js/jquery.ztree.all-3.5.js"></script>



<!-- highcharts  -->
<script src="./js/highcharts/highcharts.src.js"></script>

<!-- md5  -->
<script type="text/ecmascript" src="./js/md5/md5.js"></script>

<!-- alert  -->
<link href="./js/select/select.css" rel="stylesheet">


</head>
<body>

 

<div class="container-fluid" style="margin-top: 10px;">
<table class="table table-hover">
      <thead>
        <tr>
          <th>名称</th>
          <th>IP</th>
          <th>信息</th>
           <th>版本</th>
        </tr>
      </thead>
      <tbody id="datalist">
      </tbody>
    </table>
    </div>

 <script>
 var project = "/dt";
 $.ajax({
		type : "POST",
		url : project + "/api/zb/queryAllHostByGroupID.do",
		data : {
			 
		},
		dataType : 'json',
		success : function(res) {
			 if(res.success){
				 var rdata=res.data;
				 var vhtml="";

			 	 for (var i = 0; i < rdata.length; i++) {
			 		var bc="";
			 		 
			 		vhtml=vhtml+" <tr "+bc+" >";
			 		vhtml=vhtml+"<td>"+rdata[i].name+"</td>"; 
			 		 
			 		vhtml=vhtml+"<td>"+rdata[i].host+"</td>";
			 		vhtml=vhtml+"<td>"+rdata[i].system_name_v+"</td>";
			 		vhtml=vhtml+"<td>"+rdata[i].agent_version_v+"</td>";
	 
				 }
 
			 	 
				$("#datalist").html(vhtml);
			 }else{
				 alert("取数失败!");
			 }
		}
	});
 
 </script>


</body>
</html>